BUILD_DIR=build
DIST_DIR=dist
SLIDE_NAME=sg-slides-pt_br

slides:
	cp beamer/*.tex ${BUILD_DIR}
	cd ${BUILD_DIR} && mkdir images
	cp beamer/images/*.png ${BUILD_DIR}/images
	cd ${BUILD_DIR} && pdflatex ${SLIDE_NAME}
	cd ${BUILD_DIR} && bibtex   ${SLIDE_NAME}
	cd ${BUILD_DIR} && pdflatex ${SLIDE_NAME}
	cd ${BUILD_DIR} && pdflatex ${SLIDE_NAME}

dist: slides
	cp ${BUILD_DIR}/*.pdf ${DIST_DIR}
	cp config/* ${DIST_DIR}
	cd ${DIST_DIR} && zip JavaWebStudyGuide.zip *

clean:
	rm -rf ${BUILD_DIR}/*
	rm -rf ${DIST_DIR}/*

all: clean slides
